﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ToolwebAQ.database;
using System.Data.SqlClient;
using System.Data;

namespace ToolwebAQ.adminaq
{
    public partial class AQListChildMenu : System.Web.UI.Page
    {
        int mid;
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Page_Init(object sender, EventArgs e)
        {
            BindChildMenu();
        }

        private void BindChildMenu()
        {
            mid = (Request.QueryString["m"] != null) ? int.Parse(Request.QueryString["m"].ToString()) : 0;
            using (aquariusDBDataContext db = new aquariusDBDataContext())
            {
                var listchild = from list in db.Tbl_categorymenus select list;
                SqlCommand cmd = (SqlCommand)db.GetCommand(listchild);
                DataSet ds = new DataSet();
                SqlDataAdapter da = new SqlDataAdapter(cmd);
                da.Fill(ds);
                gvListChildMenu.DataSource = ds;
                gvListChildMenu.DataBind();
            }
        }
    }
}